<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <title>giluo</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.2.0-beta.7/vue.global.prod.js"></script>
</head>

<body>
    <div id="app"></div>
    <script type="text/x-template" id="hdTemplate">
        <h2>giluo -
            <reg-two />
        </h2>
    </script>

    <script>
        //sea require.js vite webpack --> app.js
        const app = Vue.createApp({
            template: `<span>根组件 - <RegTwo />-<RegOne /></span>`,
        })

        app.component('RegOne', {
            template: '#hdTemplate',
        })

        app.component('RegTwo', {
            template: `<div>小罗同学 </div>`,
        })

        app.mount('#app')
    </script>
</body>

</html>